#!/bin/sh
if [ -d $1 ] ; then
if [ ! -f $1/sources.list ] || test "$2" = "1"; then 
  ls $1/*.c $1/*.cc $1/*.cpp > $1/sources.list 2>/dev/null;
fi
cat $1/sources.list
fi